package be.kdg.bombermanunlimited.audio.gui;

import java.awt.Dimension;

import javax.swing.JFrame;

import be.kdg.bombermanunlimited.client.CentralRegistry;
import be.kdg.bombermanunlimited.client.CentralRegistry.BombermanObjects;
import be.kdg.bombermanunlimited.client.network.NetworkFactory;

public class AudioCtrlTest {
	/**
	 * testklasse voor de audiocontrols. Deprecated.
	 * 
	 * @author Siegfried
	 * 
	 */
	public static void main(String[] args) {
		CentralRegistry reg = CentralRegistry.getRegistry();
		reg.putObject(BombermanObjects.USERNAME, "test");
		reg.putObject(BombermanObjects.RING_PORT, 2036);
		reg.putObject(BombermanObjects.HOST_IP, "127.0.0.1");
		reg.putObject(BombermanObjects.HOST_PORT, 2020);
		reg.putObject(
				BombermanObjects.MUSIC_DIRECTORY,
				"C:\\Users\\Siegfried\\Documents\\Vuze Downloads\\Symphony X - Iconoclast (Deluxe Edition) 2CD 2011 (320 kbps)\\CD1\\");

		NetworkFactory.createNetworkFactory(
				reg.getString(BombermanObjects.HOST_IP),
				reg.getInteger(BombermanObjects.HOST_PORT));
		NetworkFactory.getNetworkFactory().createRingNetwork(
				reg.getInteger(BombermanObjects.RING_PORT));

		JFrame frame = new JFrame("Audio Test");
		AudioControls audioCtrl = AudioControls.getAudioPanel();

		frame.setContentPane(audioCtrl);
		frame.pack();
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setVisible(true);
		frame.setSize(new Dimension(500, 100));
	}
}
